.chat {
  height: 100%;

  .chat-left {
    float: left;
    width: 319px;
    height: 100%;
    border-right: 1px solid #dcdfe6;

    .chat-search {
      padding: 16px;
      border-bottom: 1px solid #dcdfe6;

      :deep(.el-input__wrapper) {
        border-radius: 33px;
        background: #f0f2f5;
      }
    }

    .chat-list {
      height: calc(100% - 73px);
      overflow-y: auto;

      &::-webkit-scrollbar {
        width: 0;
      }

      .chat-item {
        display: flex;
        gap: 16px;
        padding: 16px;
        cursor: pointer;

        &.active {
          background: #eee;
        }

        .avatar {
          display: block;
          width: 40px;
          height: 40px;
          border-radius: 50%;
          flex-shrink: 0;
        }

        .content {
          flex: 1;
          min-width: 0;

          .info {
            display: flex;
            justify-content: space-between;
            align-items: center;

            .name {
              font-size: 18px;
              font-weight: bold;
              color: #333;
            }

            .time {
              font-size: 14px;
              color: #666;
            }
          }

          .message {
            font-size: 14px;
            color: #666;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }
      }
    }
  }

  .chat-right {
    float: right;
    width: 319px;
    height: 100%;
    border-left: 1px solid #dcdfe6;
    padding: 16px;

    .member-list {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-gap: 12px;

      .member-item {
        position: relative;
        background: #999;
        text-align: center;
        border-radius: 8px;
        padding: 10px;

        img {
          width: 32px;
          height: 32px;
          border-radius: 50%;
        }

        div {
          width: 60px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          margin-top: 12px;
        }

        .remove {
          position: absolute;
          top: 0px;
          right: 0px;
        }
      }

      .add-member {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #999;
        border-radius: 8px;
      }
    }
  }

  .chat-center {
    height: 100%;
    margin: 0 320px;

    .profile {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px;
      border-bottom: 1px solid #dcdfe6;

      .info {
        display: flex;
        align-items: center;
        gap: 12px;

        .name {
          font-size: 18px;
          font-weight: bold;
          color: #333;
        }

        .line-state {
          font-size: 14px;
          color: #008000;
        }
      }
    }

    .opt {
      display: flex;
      gap: 12px;

      .icon {
        display: block;
        width: 20px;
        height: 20px;
      }
    }

    .message-content {
      height: calc(100% - 140px);
      overflow-y: auto;

      &::-webkit-scrollbar {
        width: 0;
      }

      .message-item {
        width: 100%;
        padding: 16px;

        &::before,
        &::after {
          content: "";
          display: table;
          clear: both;
        }

        &.isOwner {

          .avatar {
            float: right;
          }

          .msg {
            float: right;
          }
        }

        .avatar {
          float: left;
          display: block;
          width: 32px;
          height: 32px;
          border-radius: 50%;
          margin: 0 8px;
        }

        .msg {
          float: left;
          display: flex;
          align-items: center;
          flex-wrap: wrap;
          max-width: 400px;
          background: #eee;
          padding: 12px;
          border-radius: 8px;
          word-wrap: break-word;
          white-space: pre-wrap;
          word-break: break-all;

          .desc {
            font-size: 14px;
            color: #333;
          }

          .time {
            font-size: 12px;
            color: #666;
            margin-top: 6px;
          }
        }
      }
    }

    .send-bottom {
      padding: 16px;
      border-top: 1px solid #dcdfe6;

      .opt {
        margin-bottom: 10px;
      }

      :deep(.el-input__wrapper) {
        background: #f0f2f5;
      }
    }
  }
}
